<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <script src="./js/bookManage.js"></script>
    <link rel="stylesheet" href="./css/bookManage.css">
    <title>添加图书</title>
    <!-- <script>
        function add() {
            var name = document.querySelector('#bookname').value
            var author = document.querySelector('#bookauthor').value
            $.ajax({
                url: 'http://localhost:3000/api/addBooks',
                type: 'get',
                data: {bookName: name, author: bookauthor },
                success: function (result) {
                    console.log(result)
                    if (result.message == 'ok') {
                        alert('添加成功！')
                        localStorage.setItem('currentUser',JSON.stringify(result.data))
                        location.href = 'http://localhost:5502/goCart.html'
                    } else {
                        alert('添加失败！')
                    }
                }
            })
        }
    </script> -->
</head>

<body>
    <iframe src="./header.html" scrolling="no" frameborder="0" width="100%" height="45px" frameborder="0"></iframe>
    <div class="main">
        <input type="file" class="choose"></input>
        <input type="checkbox" class="all"></input>全选
        <button class="cut">批量删除</button>
        <button>导入文件</button>
        <input type="button" name="" value="确认添加"  onclick="add()"><br>
        <button class="return">返回</button>
        <table>
            <tr>
                <td><input type="checkbox" class="sonCheck">选择</input></td>
                <td class="photo">
                    <div>
                        <img src="images/kdy3.jpg" alt="图书">
                    </div>
                </td>
                <td class="detail">
                    <span id="bookname">书名:</span>
                    <span id="bookauthor">作者:</span><br>
                    <span>库存数量:</span>
                    <span>售价:</span><br>
                    <span>出版社:</span>
                    <span>书码:</span><br>
                    <span>分类:</span>
                </td>
                <td><button class="remove">删除</button></td>
            </tr>
    </div>
</body>

</html>